Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sort introspection results #3

Merged
merged 3 commits into from
Nov 3, 2023
Merged

Conversation

sipsma
Copy link

@sipsma sipsma commented Nov 3, 2023

This makes the return value stable, which makes life easier for anyone calling it and using it as an input that becomes a cache key.


Fixing this in order to improve runtime for Zenith modules. We were invalidating cache of SDK calls too often due to this being unstable. One demo @kpenfound is working on previously took minimum ~25s every run; with this fix it goes down to ~8s.

This makes the return value stable, which makes life easier for anyone
calling it and using it as an input that becomes a cache key.

Signed-off-by: Erik Sipsma <[email protected]>
@sipsma sipsma requested a review from jedevc November 3, 2023 00:03
introspection.go Outdated

"github.com/dagger/graphql/language/ast"
"github.com/dagger/graphql/language/printer"
"golang.org/x/exp/slices"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this either needs a go mod tidy or an upgrade of go version, so we can use https://pkg.go.dev/slices (which is now built-in to the stdlib 🎉)

Signed-off-by: Erik Sipsma <[email protected]>
Signed-off-by: Erik Sipsma <[email protected]>
@sipsma sipsma merged commit b36795b into dagger:master Nov 3, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants